function doLearn(cid, var, spell_name, item_count, lern_remove_table, lern_table, ADDITIONAL__FUNCTION)
	if not canPlayerLearnInstantSpell(cid, spell_name) then
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You can\'t learn this spell.')
		return false
	end

	if getPlayerLearnedInstantSpell(cid, spell_name) then
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You alredy know this spell.')
		return false
	end
	
	local add, return_msg = ADDITIONAL__FUNCTION
	if not add then
		print('ADDITIONAL__FUNCTION')
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, return_msg)
		return false
	end
	
	--- lern_table
	for _, combat in pairs(lern_table) do
		doCombat(cid, combat, var)
	end
	
	if table.maxn(lern_remove_table[cid]) == item_count then
		for _, removeItem in pairs(lern_remove_table[cid]) do
			doRemoveItem(getThingfromPos(removeItem).uid)
		end
		playerLearnInstantSpell(cid, spell_name)
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You learned spell ['..spell_name..'], ['..getInstantSpellWords(spell_name)..']')
	end
	lern_remove_table[cid] = {}
	return true
end